
function [] = test_time_shift()

spectrum_cut = 21000;
fs = 3.5e6;

[k, t] = firwin('a500', fs, spectrum_cut, 2047);

k1 = [zeros(1, 700), k];

K = fftshift(fft(k, 2747));
K1 = fftshift(fft(k1, 2047));
fx = linspace(-fs/2, fs/2, 2747);
fx1 = linspace(-fs/2, fs/2, 2047);

figure(1);
hold on;
plot(fx, abs(K), '.');
plot(fx1, abs(K1), 'r');
legend('org', 'shifted');
title('absolute amplitudes');

figure(2);
hold on;
plot(fx, unwrap(angle(K)), '.');
plot(fx1, unwrap(angle(K1)), 'r');
legend('org', 'shifted');
title('phases');

figure(3);
hold on;
plot(fx, imag(K), '.');
plot(fx1, imag(K1), 'r');
legend('org', 'shifted');
title('imaginary part');

end